/*
题目描述：n 个骰子的点数
把 n 个骰子扔在地上，所有骰子朝上一面的点数之和为 s。输入 n ，打印出 s 的所有可能的值出现的概率
 */
public class E60 {
    public static void main(String[] args) {
        PrintProbability(2);
    }

    public static void PrintProbability(int number){
        if(number < 1){
            return;
        }
        int[][] probabilities = new int[2][];
        probabilities[0] = new int[6 * number + 1];
        probabilities[1] = new int[6 * number + 1];
        for(int i = 0; i < 6 * number + 1; i++){
            probabilities[0][i] = 0;
            probabilities[1][i] = 0;
        }
        int flag = 0;

        for(int i = 1; i <= 6; i++){
            probabilities[flag][i] = 1;
        }
        for(int k = 2; k <= number; k++){
            for(int i = 0; i < k; i++){
                probabilities[1 - flag][i] = 0;
            }

            for (int i = k; i <= 6 * k; i++){
                probabilities[1 - flag][i] = 0;
                for(int j = 1; j <= i && j <= 6; j++){
                    probabilities[1 - flag][i] += probabilities[flag][i - j];
                }
            }

            flag = 1 - flag;
        }

        double total = Math.pow(6, number);
        for(int i = number; i <= 6; i++){
            double ratio = (double)probabilities[flag][i] /total;
            System.out.printf("%d:%e\n", i, ratio);
        }
    }
}
/*
2:2.777778e-02
3:5.555556e-02
4:8.333333e-02
5:1.111111e-01
6:1.388889e-01
 */